/**
 * Created by zhaobo on 2016/12/26.
 */
import React, {Component} from "react";
import {Navigator} from "react-native";
import Sport from "./Sport";
import Rank from "./Rank";
export default class SportRoute extends Component {
  constructor() {
    super()
    this.configureScene = this.configureScene.bind(this);
  }

  render() {
    return (
      <Navigator
        initialRoute={{ component: Sport }}
        configureScene={this.configureScene}
        renderScene={(route, navigator) =>{
          return <route.component navigator={navigator} {...route.args}/>
        }}/>
    );
  }

  configureScene(route, navigator) {
    if (route.component === Rank) {
      return Navigator.SceneConfigs.FadeAndroid;
    }
    return Navigator.SceneConfigs.FloatFromRight;
  }
}